package com.day03_class_object.test;

/**
 * @ClassName: PhoneDemo
 * @Author: 豆豆在睡觉
 * @Create 2024/2/25-10:52
 * @Version 1.0
 */
public class PhoneDemo {
    // 创建对象  类名 对象ming = new 类ming();
    //Phone phone = new Phone();
    public static void main(String[] args) {
        Phone phone = new Phone();
        System.out.println(phone.brand); // null 类中的成员变量是有默认值的
        System.out.println(phone.price); // 0
        phone.brand="华为";
        phone.price=2233; //成员变量赋值
        System.out.println(phone.brand);
        System.out.println(phone.price);

        // 调用成员方法
        phone.call();
        phone.sendMessage();
    }
}
